'use strict';

const equipment = require('../models/equipment');

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
    */
    await queryInterface.bulkInsert('equipment', [
      {
        laboratoryId:1,
        equipmentName:'超级计算机',
        openTime:'8:00',
        closeTime:'22:00',
        isApplyBook:0,//0代表不可预约，1代表可以预约
        createdAt:new Date(),
        updatedAt:new Date()
      },
      {
        laboratoryId:1,
        equipmentName:'人工智能训练计算机',
        openTime:'8:00',
        closeTime:'22:00',
        isApplyBook:1,//0代表不可预约，1代表可以预约
        createdAt:new Date(),
        updatedAt:new Date()
      }
    ], {});
  },

  async down (queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
  }
};
